import json
from enum import Enum

# 获取数据的接口
BASE_GET_URL	= "https://vul.uniontech.com/api/v1/list_vuls"
BASE_UPDATE_URL	= "https://vul.uniontech.com/api/v1/update_vuls"

# token 由本人的登陆获取，获取一次后不离职应该永久可用
BASE_HEADERS	= {
	"Accept": "application/json",
	"Accept-Encoding": "gzip, deflate, br",
	"Accept-Language": "zh-CN,zh;q=0.9",
	"Cache-Control": "no-cache",
	"Connection": "close",
	"Host": "vul.uniontech.com",
	"Pragma": "no-cache",
	"Referer": "https://vul.uniontech.com/",
	"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36",
}

# 本地代码路径
CODE_419E_PATH="~/gg/e/kernel/"
CODE_419A_PATH="~/gg/CJllinux-4.19.90/"
CODE_510_PATH="~/gg/e/kernel-5.10-server/"
CODE_660_PATH="~/gg/kernel-v25/"

# 代码分支名称
CODE_419E_1070_BRANCH="lts-1070"
CODE_419E_1060_BRANCH="lts-1060"
CODE_419E_1050_BRANCH="lts-1050u2"

CODE_419A_1070_BRANCH="lts-1070"
CODE_419A_1060_BRANCH="lts-1060"
CODE_419A_1050_BRANCH="lts-1050u2"

CODE_510_1070_BRANCH="lts-1070"
CODE_510_1060_BRANCH="lts-1060"
CODE_510_1050_BRANCH="lts-1050"

CODE_660_2500_BRANCH="proj-s-dev"


class Production(Enum):
    V25 = 1
    V20_510E_1070 = 2
    V20_510E_1060 = 3
    V20_510E_1050 = 4
    V20_510A_1070 = 5
    V20_510A_1060 = 6
    V20_510A_1050 = 7
    V20_419A_1070 = 8
    V20_419A_1060 = 9
    V20_419A_1050 = 10
    V20_419E_1070 = 11
    V20_419E_1060 = 12
    V20_419E_1050 = 13

"""
更新VUL 对应的内核的版本和解决人
"""
FIXER=""
FIX_419E_1070_VERSION=""
FIX_419E_1060_VERSION=""
FIX_419E_1050_VERSION=""
FIX_419A_1070_VERSION=""
FIX_419A_1060_VERSION=""
FIX_419A_1050_VERSION=""

FIX_510A_1070_VERSION=""
FIX_510A_1060_VERSION=""
FIX_510A_1050_VERSION=""
FIX_510E_1070_VERSION=""
FIX_510E_1060_VERSION=""
FIX_510E_1050_VERSION=""
FIX_660_2500_VERSION=""

"""
批更新的记录条数
"""
UPDATE_BATCH_SIZE=80

# xlsxampatch 命令使用的全局变量
UPSTREAM_CODE_PATH=""
UPSTREAM_CODE_BRANCH=""
AM_CODE_PATH=""
AM_CODE_BRANCH=""
AM_XLSX_PATH=""
AM_GIT_NAME=""
AM_GIT_EMAIL=""
XLSX_START_NUMBER=1

AM_TEMP_PATCH_PATH="~/vul_temp_patches/"

##############################################################################
# deepseek
DEEPSEEK_API_KEY=""

# 配置 DeepSeek API
DEEPSEEK_API_URL = "https://api.deepseek.com/"

EXPLOITS_XLSX_PATH = ""
